package org.frog.sgs.card.role.type;

/**
 * @author duanxiangqi
 * @date 2012-10-15
 */
public enum RoleType {
	/**
	 * 主公
	 */
	zhugong(1),
	/**
	 * 忠臣
	 */
	zhongchen(2),
	/**
	 * 内奸
	 */
	neijian(3),
	/**
	 * 反贼
	 */
	fanzei(4);

	public static RoleType get(int type) {
		for (RoleType roleType : RoleType.values()) {
			if (roleType.getValue() == type) {
				return roleType;
			}
		}
		return null;
	}

	private int value;

	RoleType(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}
}
